@extends('admin.admin.index')
@section('goodsname','后台首页')
@section('weizhi','分类修改')
@section('con')
<div class="col-md-6 col-md-offset-3">
    <div class="col-lg-6 col-lg-offset-2">
        <div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-12">
                        <form role="form" action="{{url('/admin/beauty/update')}}" method="post">
                            <div class="form-group">
                                <label>选择所属分类</label>
                                <select name="gid" class="form-control">
                                    <option value="0">顶级分类</option>
                                @foreach($cates as $k=>$v)
                                    @if($v->id == $catesinfo->gid)
                                        <option value="{{$v->id}}" selected="selected">{{$v->goodsname}}</option>
                                    @else
                                        <option value="{{$v->id}}">{{$v->goodsname}}</option>
                                    @endif
                                @endforeach
                                </select>
                            </div>    
                            <div class="form-group">
                                <label>分类名</label>
                                <input class="form-control" type="text" name="goodsname" value="{{$catesinfo->goodsname}}">
                            </div>
                            <input type="hidden" name="id" value="{{$catesinfo->id}}">
                            <input type="hidden" name="yid" value="{{$catesinfo->gid}}">
                            {{csrf_field()}}
                            <button class="btn btn-primary btn-lg btn-block">修改</button>
                        </form>
                    </div>
                </div>
                <!-- /.row (nested) -->
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
@endsection